<?php

namespace app\admin\validate\workteam;

use think\Validate;

class Accountlog extends Validate
{

    /**
     * 验证规则
     */
    protected $rule = [
        'type'=>"require",
        'project_id'=>"require|gt:0",
        'money'      => 'require',
    ];

    /**
     * 提示消息
     */
    protected $message = [
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => [
            'type',
            'project_id',
            'money',
        ],
    ];

    public function __construct(array $rules = array(), $message = array(), $field = array())
    {

        $this->field =[
            'type'=>__("费用类型"),
            'project_id'=>__("项目"),
            'money'=>__("费用"),
        ];
        parent::__construct($rules, $message, $field);
    }
}
